home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 03 - 1987 / 03.07 Jul 87 / basic source / SampleRes < prev    next >
Encoding:
Text File  |  1987-06-01  |  8.4 KB  |  368 lines  |  [TEXT/EDIT]

  1. ;
  2. ; Resource File For Basic Program
  3. ;
  4. ; some equates we'll need:
  5. chk        equ    $12    ;ascii for check mark character
  6. visible        equ    $FFFF    ;TRUE boolean
  7. invisible    equ    0    ;FALSE boolean
  8. nogoaway    equ    0    ;FALSE boolean
  9. goaway        equ    $FFFF    ;TRUE boolean
  10. button        equ    4    ;DITL BUTTON
  11. chkbox        equ    5    ;DITL CHECK BOX
  12. radio        equ    6    ;DITL RADIO BUTTON
  13. stattext    equ    8+128    ;DITL STATIC TEXT (DISABLED)
  14. editxtds    equ    16+128    ;EDIT TEXT DISABLED
  15. iconitem    equ    32    ICON in dialog box
  16. ;
  17. ; Signature of program
  18. ;
  19. [[ PROF,0
  20.     TEXT    #"PCMacBasic Demo  Version 1.0  June 1, 1987"
  21. ]]
  22. ; Apple menu
  23.  
  24. $$ MENU,1,4            Menu ID 1
  25. 0,0,0                Placeholders
  26. $FFFFFFFB            enable mask - 2 disabled
  27. "/$14"                menu title = apple char
  28. 2                two items in this menu
  29. ;                item 1:
  30. About this program...        the menu item
  31. 0,0                  no icon, no keybd equivalent
  32. 0,0                  no marking char, text style = plain
  33. ;                item 2:
  34. --------------------          the menu item
  35. 0,0,0,0                  no icon, no keybd, no mark, plain text
  36.  
  37. ;
  38. ; Files menu
  39. ;
  40.  
  41. $$ MENU,302,4            Menu ID 302
  42. 0,0,0                Placeholders
  43. $FFFFFFFF            enable mask - none disabled
  44. Files                menu title
  45. 1                three items in this menu
  46. ;                item 1:
  47. "Quit"
  48. 0,0                  no icon, no keybd equivalent
  49. 0,0                  no marking char, text style = plain
  50.  
  51.  
  52. ; Edit menu
  53.  
  54. $$ MENU,301,4            Menu ID 301
  55. 0,0,0                Placeholders
  56. $FFFFFFF9            enable mask - 1st & 2nd disabled
  57. Edit                menu title
  58. 6                six items in this menu
  59. ;                item 1:
  60. "Can't Undo"                    the menu item
  61. 0,0,0,0              no icon, no keybd equivalent     no marking char, text style = plain
  62. ;                item 2:
  63. "----------"              the menu item
  64. 0,0,0,0                  no icon, no keybd, no mark, plain text
  65. ;                item 3:
  66. "Cut"
  67. 0,'X',0,0              no icon, no keybd, no mark, plain text
  68. ;                item 4:
  69. "Copy"                  the menu item
  70. 0,'C',0,0              no icon, keybd, no mark, plain text
  71. ;                item 5:
  72. "Paste"                  the menu item
  73. 0,'V',0,0              no icon, keybd, no mark, plain text
  74. ;                item 6:
  75. "Clear"                  the menu item
  76. 0,0,0,0                   no icon, keybd, no mark, plain text
  77.  
  78.  
  79. ; STOP or apple/period dialogue list
  80.  
  81. $$ DITL,302,32            Dialog item list, ID = 302, ATTR=32
  82. 5                5 items in list
  83.  
  84. ;                item 1:
  85. 0                  handle holder
  86. 50,175,65,190              display rectangle
  87. chkbox                  item type
  88. " "
  89.  
  90. ;                item 2:
  91. 0                  handle holder
  92. 50,200,65,330              display rectangle
  93. StatText              item type
  94. "Quit"                  the item
  95.  
  96. ;                item 3:
  97. 0                  handle holder
  98. 50,10,65,25              display rectangle
  99. chkbox                  item type
  100. " "
  101.  
  102. ;                item 4:
  103. 0                  handle holder
  104. 50,35,65,165              display rectangle
  105. StatText              item type
  106. "Continue"              the item
  107.  
  108. ;                item 5:
  109. 0                  handle holder
  110. 10,10,30,400              display rectangle
  111. StatText              item type
  112. "Program interrupted in line number ^1"    ;the item
  113.  
  114. ; fatal error dialogue list
  115.  
  116. $$ DITL,400,32            Dialog item list, ID = 400, ATTR=(32)
  117. 5                5 items in list
  118.  
  119. ;                item 1:
  120. 0                  handle holder
  121. 10,100,30,400              display rectangle
  122. StatText              item type
  123. "Fatal program error"          the item
  124.  
  125. ;                item 2:
  126. 0                  handle holder
  127. 25,10,40,25              display rectangle
  128. chkbox                  item type
  129. " "
  130.  
  131. ;                item 3:
  132. 0                  handle holder
  133. 25,35,40,165              display rectangle
  134. StatText              item type
  135. "Restart"              the item
  136.  
  137. ;                item 4:
  138. 0                  handle holder
  139. 40,10,55,400              display rectangle
  140. StatText              item type
  141. "Error ^0 in Line Number ^1"      the item
  142.  
  143. ;                item 5:
  144. 0                  handle holder
  145. 55,10,70,400              display rectangle
  146. StatText              item type
  147. "^2"                  the item
  148.  
  149. ; invalid keyboard entry alert list
  150.  
  151. $$ DITL,301,32            Dialog item list, ID = 301, ATTR=(32)
  152. 3                3 items in list
  153.  
  154. ;                item 1:
  155. 0                  handle holder
  156. 80,200,97,310              display rectangle
  157. button                  item type
  158. "I'm sorry !"              the item
  159.  
  160. ;                item 2:
  161. 0                  handle holder
  162. 30,70,50,455              display rectangle
  163. StatText              item type
  164. "Invalid input in line number ^1" the item
  165.  
  166. ;                item 3:
  167. 0                  handle holder
  168. 50,25,70,455              display rectangle
  169. StatText              item type
  170. "Please start over from the beginning." ;the item
  171.  
  172. ; 'About' Dialog List
  173.  
  174. $$ DITL,300,32            Dialog item list, ID = 300, ATTR=(32)
  175. 3                3 items in list
  176.  
  177. ;                item 2:
  178. 0                  handle holder
  179. 30,25,50,455              display rectangle
  180. StatText              item type
  181. "About this program …"              the item
  182.  
  183. ;                item 3:
  184. 0                  handle holder
  185. 50,25,70,455              display rectangle
  186. StatText              item type
  187. "This is a sample PCMacBasic program." ;the item
  188.  
  189. ;                item 4:
  190. 0                  handle holder
  191. 70,25,90,455              display rectangle
  192. StatText              item type
  193. "©MacTutor 1987, by Dave Kelly" ;the item
  194.  
  195. ;  'About' Dialog Box
  196.  
  197. $$ DLOG,300,32            dialog, ID = 300, ATTR=32
  198. 100,15,250,495            bounds rectangle
  199. 1                type = modal dialog box
  200. visible                initial state
  201. nogoaway            no close box
  202. 0                refcon
  203. 300                resc ID of DLOG's item list
  204. |                no title
  205.  
  206. ;  Function Key Dialog Box
  207.  
  208. $$ DLOG,501,32            dialog, ID = 501, ATTR=32
  209. 45,15,300,495            bounds rectangle
  210. 1                type = modal dialog box
  211. visible                initial state
  212. nogoaway            no close box
  213. 0                refcon
  214. 501                resc ID of DLOG's item list
  215. |                no title
  216.  
  217. ;  Debugger Dialog Box
  218.  
  219. $$ DLOG,650,32            dialog, ID = 650, ATTR=32
  220. 100,60,280,450            bounds rectangle
  221. 1                type = modal dialog box
  222. visible                initial state
  223. nogoaway            no close box
  224. 0                refcon
  225. 650                resc ID of DLOG's item list
  226. |                no title
  227.  
  228.  
  229. ;  invalid keyboard input alert box
  230.  
  231. $$ ALRT,301,32            alert, ID = 301, ATTR=32
  232. 100,15,210,345            bounds rectangle
  233. 301                resc ID of DLOG's item list
  234. $7655                stages
  235.  
  236. ;  BASIC default Window
  237.  
  238. $$ WIND,300,4            Window, id=300, attr=4
  239. 40,10,325,500
  240. 0                type of window
  241. visible
  242. goaway
  243. 0                refcon
  244. Untitled            title
  245.  
  246.  
  247. ; Vertical scroll bar for WIND 300
  248.  
  249. $$ CNTL,300
  250. 20,400,220,416
  251. 0            initial value
  252. Invisible            
  253. 12000            max value
  254. 0            min value
  255. 16            scroll bar
  256. 0            refcon
  257. "vertical scroll bar"   ;title
  258.  
  259.  
  260. ; Horizontal scroll bar for WIND 300
  261.  
  262. $$ CNTL,400
  263. 200,20,216,400
  264. 0            initial value
  265. Invisible            
  266. 12000            max value
  267. 0            min value
  268. 16            scroll bar
  269. 0            refcon
  270. "horizontal scroll bar"   ;title
  271.  
  272. ; Cursor
  273. $$ CURS,300,4
  274. $01801A70,$2648264A,$124D1249,$68099801,$88024002,$20022004,$10040808,$04080408
  275. $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000
  276. $0008,$0008
  277.  
  278.  
  279. ; Professor Mac Icon & Mask for Program Icon
  280. $$ ICN#,128
  281. $00000000,$00000000,$00000000,$00070000,$000F8000,$001FE000,$003FF800,$007FFE00
  282. $00FFFF00,$01FEFF00,$01FFBE00,$00FFEC00,$005FFE00,$0087FD00,$00B9E480,$00B445C0
  283. $00800480,$008005C0,$00A02480,$00BFE400,$009DC5DB,$00400895,$00201095,$001FE000
  284. $00102000,$001FE000,$00601800,$01800600,$02186100,$04C30C80,$04000080,$07FFFF80
  285. $00000000,$00000000,$00000000,$00070000,$000F8000,$001FE000,$003FF800,$007FFE00
  286. $00FFFF00,$01FFFF00,$01FFFE00,$00FFFC00,$007FFE00,$00FFFD00,$00FFFC80,$00FFFDC0
  287. $00FFFC80,$00FFFDC0,$00FFFC80,$00FFFC00,$00FFFDDB,$007FF895,$003FF095,$001FE000
  288. $001FE000,$001FE000,$007FF800,$01FFFE00,$03FFFF00,$07FFFF80,$07FFFF80,$07FFFF80
  289.  
  290. ; Document Icon and mask for Document Icon
  291. $$ ICN#,129
  292. $00000000,$7FFFFF80,$403FFD40,$407FFD20,$40FFFD10,$41FFFD08,$43FFFDFC,$47FFFC04
  293. $4FFEFFFC,$5FFD01F4,$4FFEFE64,$47FFFFC4,$41FFFFA4,$423FFF94,$440FFE94,$4463FCBC
  294. $44F0F894,$44C830AC,$44000094,$4518C4AC,$457DF494,$45FFFCAC,$44FDF894,$4438E0AC
  295. $44000084,$43FFFF04,$47FFFF84,$4C0000C4,$518CCC24,$60000014,$7FFFFFFC,$7FFFFFFC
  296. $00000000,$7FFFFF80,$7FFFFFC0,$7FFFFFE0,$7FFFFFF0,$7FFFFFF8,$7FFFFFFC,$7FFFFFFC
  297. $7FFFFFFC,$7FFFFFFC,$7FFFFFFC,$7FFFFFFC,$7FFFFFFC,$7FFFFFFC,$7FFFFFFC,$7FFFFFFC
  298. $7FFFFFFC,$7FFFFFFC,$7FFFFFFC,$7FFFFFFC,$7FFFFFFC,$7FFFFFFC,$7FFFFFFC,$7FFFFFFC
  299. $7FFFFFFC,$7FFFFFFC,$7FFFFFFC,$7FFFFFFC,$7FFFFFFC,$7FFFFFFC,$7FFFFFFC,$7FFFFFFC
  300.  
  301. ; Runtime Configuration for Macintosh
  302.  
  303. [[ CFIG,301
  304. ;  .I
  305. ; SCREEN buffer & Update method
  306. ;       2 = Text buffer with attributes
  307. ;       6 = Text buffer without attributes
  308. ;      10 = Text buffer exists but don't use for automatic update
  309. ;      14 = Text buffer without attributes but don't update
  310.     DC.W    2
  311. ; String Space growth rate
  312.     DC.W    4096
  313. ; File Buffer Space
  314.     DC.W    4096
  315. ; Document Width
  316.     DC.W    640
  317. ; Document Height
  318.     DC.W    400
  319. ; Border Width
  320.     DC.W    40
  321. ; Border Height
  322.     DC.W    30
  323. ; Horiz Point Scale * 16
  324.     DC.W    16
  325. ; Vert Point Scale * 16
  326.     DC.W    16
  327. ; Aspect *16
  328.     DC.W    16
  329. ; Default font
  330.     DC.W    4
  331. ; Default font size
  332.     DC.W    12
  333. ; Character cell Height
  334.     DC.W    12
  335. ; Character cell Width
  336.     DC.W    -1
  337. ]]
  338.  
  339. ; File reference for program
  340.  
  341. $$ FREF,128            FREF resc, ID = 128
  342. APPL                filetype
  343. 0                local ID for icon list
  344. |                no filename follows the application
  345.  
  346. ; File reference for document
  347.  
  348. $$ FREF,129            FREF resc, ID = 129
  349. TEXT                filetype
  350. 1                local ID for icon list
  351. |                no filename follows the application
  352.  
  353. ; Bundle
  354.  
  355. $$ BNDL,128            bundle resc, ID = 128
  356. PROF                the application's signature again
  357. 0                ID is again 0 by convention
  358. 2                two resc types in the BNDL list:
  359. ICN#,2                map one icon list:
  360. 0,128                local ID 0 -> actual ID 128
  361. 1,129
  362. FREF,2                map one FREF list:
  363. 0,128                local ID 0 -> actual ID 128
  364. 1,129
  365.  
  366.  
  367.  
  368.